<template>
    <a-modal
        title="匹配企业列表"
        :visible="visible"
        centered
        @cancel="visible = false"
        width="1000px"
        :maskClosable="false"
        :footer="null"
    >
        <div class="xl-table-content">
            <xlTable
                :columns="columns"
                :dataSource="data"
                :pagination="pagination"
                :loading="loading"
                @change="handleTableChange"
                rowKey="id"
                :scrollX="900"
                bordered>
                <template v-slot:score="scope">
                    <a-rate :default-value="scope.record.matchingScore/2" allow-half disabled></a-rate>
                </template>
            </xlTable>
        </div>
    </a-modal>
</template>

<script>
import xlMixin from '@/components/mixin/index'

export default {
    name: 'match',
    mixins: [xlMixin],
    data() {
        return {
            visible: false,
            confirmLoading: false,
            loading: false,
            columns: [
                {
                    title: '统一社会信用代码',
                    dataIndex: 'creditCode',
                },
                {
                    title: '企业名称',
                    dataIndex: 'companyName',
                },
                {
                    title: '所属行业',
                    dataIndex: 'industry',
                },
                {
                    title: '匹配结果',
                    dataIndex: 'matchingScore',
                    scopedSlots: {customRender: 'score'}
                }
            ],
            data: [],
            url: {
                list: '/policy/api/technology/project/matching/company/result/page/list'
            },
            queryParam: {}
        }
    },
    created() {
    },
    methods: {
    }
}
</script>

<style scoped lang="less">
.xl-table {
    .xl-table-content {
        padding: 16px;
    }
}
</style>